package com.mms.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.mms.dao.IMedicalDao;
import com.mms.pojo.Medical;
import com.mms.pojo.UserInfo;
import com.mms.service.IMedicalService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 陈林鹏
 * @since 2021-04-14
 */
@Service
public class MedicalServiceImpl extends ServiceImpl<IMedicalDao, Medical> implements IMedicalService {


    public Medical getMedicalByUserInfo(UserInfo userinfo) {
        //定义 条件
        Wrapper medicalWrapper = new EntityWrapper();
        medicalWrapper.eq("user_info_id"
                , userinfo.getId());
        //查询出医生数据
        return selectOne(medicalWrapper);
    }

}
